{include app:admin.inc.header}
<!--tmpl-resource-->
{include app:admin.inc.top}


<div class="container-fluid content-body">
	<div class="main">
		<!-- left side start-->
		{include admin.inc.menu}
		<!-- left side end-->


		<!-- main content start-->
		<section class="right-section" id="right-section">
			<!-- start of inner-frame -->
			<div class="inner-iframe">

				<!-- page breadcrumb start-->
				{include admin.inc.bread}
				<!-- page "breadcrumb end-->
				<!-- Nav tabs -->
				<ul class="nav nav-tabs">

					<li><a href="{$add_url}"><i class="glyphicon glyphicon-plus"></i> 添加会员</a></li>
					<li class="active"><a href="javascript:void(0);"><i class="glyphicon glyphicon-th-list"></i> 会员列表</a></li>
					<!--<li><a href="/admin/index/edit"><i class="glyphicon glyphicon-edit"></i> 编辑会员</a></li>-->

				</ul>
				<div class="inner-container">
					<form class="form-inline search-form" role="form" id="J_List_Form">
						<input type="hidden" name="pagesize" value="{$pagesize}" >
						<!-- searchinput -->
						<!--<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									<select class="" name="s_type">
										<option {if $s_type==="1"}selected="selected"{/if}value="1">会员账号</option>
										<option {if $s_type==="2"}selected="selected"{/if}value="2">实名认证</option>
									</select>
								</div>
								<input type="text" class="form-control input-sm" maxlength="20" placeholder="关键字" name="s_keyword" value="{$s_keyword}">
							</div>
						</div>-->
						<div class="form-group">
							<select name="s_type" id="select-mix-option" class="form-control input-sm">
								<option {if $s_type==="1"}selected="selected"{/if}value="1">会员账号</option>
								<option {if $s_type==="2"}selected="selected"{/if}value="2">实名认证</option>
							</select>
						</div>
						<div class="form-group">
							<div class="input-group">
								<input type="text" class="form-control input-sm" maxlength="{maxlength}" placeholder="关键字" name="s_keyword" value="{$s_keyword}">
							</div>
						</div>

						<!-- searchdatetime -->
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									注册时间
								</div>
								<input style="width:100px;" class="form-control form-control-inline input-sm mdate"  size="16" type="text"
								name="s_s_reg_time" value="{$s_s_reg_time}"
								placeholder="开始时间" />
						
								<div class="input-group-addon">
									-
								</div>
								<input style="width:100px;" class="form-control form-control-inline input-sm mdate"  size="16" type="text"
								name="s_e_reg_time" value="{$s_e_reg_time}"
								placeholder="结束时间" />
							</div>
						</div>

						<input type="hidden" name="order" value="{$order}">
						<button type="submit" class="btn btn-sm btn-success"><i class="glyphicon glyphicon-search"></i> 查询</button>
						{run exportBtn()}

						<!-- search form end -->
					<!--</form>
					<form id="J_List_Form">-->
						<div class="table-responsive">
							<table id="J_ListTable" class="table  table-hover  table-striped">
								<!--tmpl-listtable-->

								<!-- listblock -->
								<thead>
									<tr>
										<th width="20"><input type="checkbox" class="icheck check-all" /></th>
										<!--tmpl-fieldheaders-->

										<th>会员账号<!--tmpl-orderth-->
										
										&nbsp;<i data-val='{if $order=="password ASC"}password DESC{else}password ASC{/if}' class='fa ofield {if $order=="password ASC"}fa-chevron-up{elseif $order=="password DESC"}fa-chevron-down{else}fa-minus{/if}' style='color:#eee;' href='javascript:;'></i>
										</th>

										<th>累计消费(￥)<!--tmpl-orderth-->
										
										&nbsp;<i data-val='{if $order=="sex ASC"}sex DESC{else}sex ASC{/if}' class='fa ofield {if $order=="sex ASC"}fa-chevron-up{elseif $order=="sex DESC"}fa-chevron-down{else}fa-minus{/if}' style='color:#eee;' href='javascript:;'></i>
										</th>
										<th>实名认证<!--tmpl-orderth-->
										
										&nbsp;<i data-val='{if $order=="qq ASC"}qq DESC{else}qq ASC{/if}' class='fa ofield {if $order=="qq ASC"}fa-chevron-up{elseif $order=="qq DESC"}fa-chevron-down{else}fa-minus{/if}' style='color:#eee;' href='javascript:;'></i>
										</th>

										<th>注册时间<!--tmpl-orderth-->
										
										&nbsp;<i data-val='{if $order=="reg_time ASC"}reg_time DESC{else}reg_time ASC{/if}' class='fa ofield {if $order=="reg_time ASC"}fa-chevron-up{elseif $order=="reg_time DESC"}fa-chevron-down{else}fa-minus{/if}' style='color:#eee;' href='javascript:;'></i>
										</th>
										<th>最后交易时间<!--tmpl-orderth-->
										
										&nbsp;<i data-val='{if $order=="dasu_pay_id ASC"}dasu_pay_id DESC{else}dasu_pay_id ASC{/if}' class='fa ofield {if $order=="dasu_pay_id ASC"}fa-chevron-up{elseif $order=="dasu_pay_id DESC"}fa-chevron-down{else}fa-minus{/if}' style='color:#eee;' href='javascript:;'></i>
										</th>
										<th>所属分组<!--tmpl-orderth-->
										
										&nbsp;<i data-val='{if $order=="last_login_time ASC"}last_login_time DESC{else}last_login_time ASC{/if}' class='fa ofield {if $order=="last_login_time ASC"}fa-chevron-up{elseif $order=="last_login_time DESC"}fa-chevron-down{else}fa-minus{/if}' style='color:#eee;' href='javascript:;'></i>
										</th>

										<th>状态</th>

										<th>上次登陆ip<!--tmpl-orderth-->
										
										&nbsp;<i data-val='{if $order=="last_login_ip ASC"}last_login_ip DESC{else}last_login_ip ASC{/if}' class='fa ofield {if $order=="last_login_ip ASC"}fa-chevron-up{elseif $order=="last_login_ip DESC"}fa-chevron-down{else}fa-minus{/if}' style='color:#eee;' href='javascript:;'></i>
										</th>
								
										<th>操作</th>
									</tr>
								</thead>
								<tbody>
								{if empty($items)}
								<tr>
									<td style="text-align:center;" colspan="14" class="empty-table-td">{$emptyRecord}</td>
								</tr>
								{/if}
								{loop $items $value}
								<tr>
									<td><input type="checkbox" class="icheck" name="ids[]" value="{$value[id]}"/></td>
									<!--tmpl-fieldlist-->
									<td>{$value[username]}</td>
									<td>{$value[total_cost]}</td>
									<td>{$value[real_name]}</td>
									<td>{$value[reg_time]}</td>
									<td>{$value[last_trade_time]}</td>
									<td>{$value[group_name]}</td>
									<td><input type="checkbox" data-field="status" class="bswitch bswitch-list" data-size="mini"
											   {if $value[status]=='1'}checked{/if} {if $value[total]}disabled="disabled"{else}data-id="{$value[id]}"{/if}data-on-text="启用" data-off-text="禁用">
									</td>
									<td>{$value[last_login_ip]? long2ip($value[last_login_ip]) : ""}</td>
									<td>
										<!--tmpl-listbtn-->
								
										<!-- listbtnedit -->
										{if (in_array('admin/member/bind',$priv) || empty($priv)) && empty($value[dasu_pay_id])}
										<a href="#" data-id={$value[id]} data-username="{$value[username]}" class="btn btn-warning btn-xs item-bind">
											<i class="glyphicon glyphicon-lock"></i> 绑定</a>
										{/if}

										{if in_array('admin/member/edit',$priv) || empty($priv)}
										<a href="{$edit_url}?id={$value[id]}" class="btn btn-primary btn-xs">
											<i class="glyphicon glyphicon-edit"></i> 编辑</a>
										{/if}
										
										<!-- listbtndelete -->
										{if in_array('admin/member/delete',$priv) || empty($priv)}
										<a href="{$delete_url}?id={$value[id]}" class="btn btn-danger btn-xs item-remove">
											<i class="glyphicon glyphicon-trash"></i> 删除</a>
										{/if}
									</td>
								</tr>
								{/loop}
							</table>

						</div>
						
					</form>
					<div class="text-right">
						{$pagemenu}
					</div>
					<!--批量操作 start-->
					<div class="btn-group dropup" data-act="operateAll">
						<button type="button" class="btn btn-warning" disabled>批量操作</button>
						<button type="button" class="btn btn-warning dropdown-toggle" data-toggle="dropdown" aria-expanded="false" disabled>
							<span class="caret"></span>
							<span class="sr-only">Toggle Dropdown</span>
						</button>
						<ul class="dropdown-menu" role="menu">
							<li><a href="#" data-action="on">启用</a></li>
							<li><a href="#" data-action="off">禁用</a></li>
							{if in_array('admin/member/delete',$priv) || empty($priv)}
							<li><a href="#" data-action="delete">删除</a></li>
							{/if}
						</ul>
					</div>
					<!--批量操作 end-->
				</div>
			</div>
		</section>
	</div>
</div>

<!--footer section start-->
{include admin.inc.footer}
<!--footer section end-->

<!--tmpl-script-->

<!-- template -->
<script type="text/html" id="content-add-template">

	<form role="form" class="content-add-form" id="content-add-form" autocomplete="off">

		<div class="form-element">
			<div class="form-group">
				<label><span class="asterisk">*</span>大塑账户</label>
				<input type="password" style="position: absolute;left:-9999px;opacity: 0;">
				<input type="text" name="data[username]" value="" class="form-control" maxlength="15" placeholder="请输入大塑账户" dtype="mobile" required cname="大塑账户"/>
			</div>
			<p class="help-block"></p>
		</div>
		<div class="form-element">
			<div class="form-group">
				<label><span class="asterisk">*</span>登陆密码</label>
				<input type="password" name="data[password]" value="" class="form-control" maxlength="15" placeholder="请输入登陆密码" required cname="登陆密码"/>
			</div>
			<p class="help-block"></p>
		</div>
		<input type="hidden" name="data[app_userid]" value="{[item.id]}">
		<input type="hidden" name="data[app_username]" value="{[item.username]}">
	</form>
</script>

<!-- pagescript -->
<script type="text/javascript">
	seajs.use("admin/memberindex",function (exports){

		<!--tmpl-templatejavascript-->
		/*parameter.detailUrl="{$detail_url}";
		parameter.deleteUrl="{$delete_url}";
		parameter.editUrl="{$do_edit_url}";
		parameter.upload_url="{$upload_url}";
		parameter.image_search_url="{$image_search_url}";
		parameter.image_list_url="{$image_list_url}";
		
		parameter.init();	*/
		exports.init({
			set_url : '/admin/member/set/',
			bind_url : '/admin/member/do_bind',
			insert_url : '{$insert_url}',
			edit_url : '{$edit_url}',
			update_url : '{$update_url}'
		});
	});
</script>


<script id="assocpage" type="text/html">
<div class="text-right">
	<ul class="pagination blog-pagination">
		<li><a class="assoc-page" data-page="{[prev]}" href="javascript:void(0);">上一页</a></li> 
		{[loop pages page]}

		<li {[if curr == page]}class="active"{[/if]}><a class="assoc-page" data-page="{[page]}"  href="javascript:void(0)">{[page]}</a></li> 

		{[/loop]}
		<li><a class="assoc-page" href="javascript:void(0);" data-page="{[nexts]}">下一页</a></li> 
	</ul>	
</div>
</script>
</body>
</html>
